<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <!-- 引入样式 -->
    <link
      rel="stylesheet"
      href="https://cdn.bootcdn.net/ajax/libs/element-ui/2.15.0//theme-chalk/index.css"
    />

    <script
      crossorigin="anonymous"
      integrity="sha512-vMD/IRB4/cFDdU2MrTwKXOLmIJ1ULs18mzmMIWLCNYg/nZZkCdjBX+UPrtQdkleuuf0YaqXssaKk8ZXOpHo3qg=="
      src="https://lib.baomitu.com/echarts/5.0.1/echarts.min.js"
    ></script>

    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.js"></script>
  </head>
  <body>
    <!-- 为ECharts准备一个具备大小（宽高）的Dom -->
    aaaaaa
    <div id="main" style="width: 1000px; height: 800px"></div>
    <div id="main2" style="width: 1000px; height: 800px"></div>
    <script type="text/javascript">
      // 基于准备好的dom，初始化echarts实例
      var myChart = echarts.init(document.getElementById("main"));
      var myChart2 = echarts.init(document.getElementById("main2"));

      // 指定图表的配置项和数据
      var option = {
        title: {
          text: "ECharts 入门示例",
        },
        tooltip: {},
        legend: {
          data: ["销量"],
        },
        xAxis: {
          data: ["衬衫", "羊毛衫", "雪纺衫", "裤子", "高跟鞋", "袜子"],
        },
        yAxis: {},
        series: [
          {
            name: "销量",
            type: "bar",
            data: [5, 20, 36, 10, 10, 20],
          },
        ],
      };

      // 使用刚指定的配置项和数据显示图表。
      myChart.setOption(option);
      myChart2.setOption(option);

      $(document).ready(function () {
        htmlobj = $.ajax({ url: "/", async: false });
console.log(htmlobj)
        option.title.text = JSON.stringify(htmlobj.responseText);
        myChart.setOption(option);

        window.setTimeout(function () {
          window.status = "imdone";
        }, 5000);

        $("#myDiv").html(htmlobj.responseText);
      });
    </script>
  </body>
</html>
